package kr.hkit.powerjava.chapter14;

import java.awt.GridLayout;
import java.awt.HeadlessException;

import javax.swing.JButton;
import javax.swing.JFrame;

class MyFrame2 extends JFrame {

	public MyFrame2(String title) throws HeadlessException {
		super(title);
		init();
	}

	private void init() {
		
		
		setSize(400, 300);
		setLayout(new GridLayout(0,3));
		
		add(new JButton("Button1"));
		add(new JButton("Button2"));
		add(new JButton("Button3"));
		add(new JButton("B4"));
		add(new JButton("Long Button5"));
		
		setVisible(true);
		
	}
	
	
	
}



public class GridLayoutEx {
	public static void main(String[] args) {
		new MyFrame2("GirdLayout 예제");
		
	}
}
